<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%user_resource}}".
 *
 * @property integer $id
 * @property integer $user_id
 * @property integer $resource_type
 * @property integer $resource_id
 * @property integer $status
 * @property string $last_update
 */
class UserResource extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%user_resource}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['user_id', 'resource_type', 'resource_id'], 'required'],
            [['user_id', 'resource_type', 'resource_id', 'status'], 'integer'],
            [['last_update'], 'safe']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'user_id' => 'User ID',
            'resource_type' => 'Resource Type',
            'resource_id' => 'Resource ID',
            'status' => 'Status',
            'last_update' => 'Last Update',
        ];
    }
}
